home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_12.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  2.4 KB  |  72 lines

  1. <HTML>
  2. <HEAD>
  3.   <TITLE>Exposing Style Sheets in IE4</TITLE>
  4.  
  5.   <LINK ID=linked REL=STYLESHEET TYPE="text/css" HREF="linkedStyle.css">
  6.  
  7.   <STYLE ID=defined TITLE="The Defined Style Sheet">
  8.     @import url(importedStyle.css);
  9.  
  10.     H1               { color: darkBlue; margin: 0px; }
  11.     .layer           { position: absolute; }
  12.     #banner          { background-color: yellow; }
  13.   </STYLE>
  14. </HEAD>
  15.  
  16. <BODY>
  17.   <BLOCKQUOTE>
  18.  
  19.   <P><IMG ID=arrow SRC="arrow.gif">
  20.  
  21.   <DIV ID=banner CLASS=layer STYLE="color: blue; left: 72; top: 15;">
  22.     <H1>
  23.       Exposing Style Sheets in IE4
  24.     </H1>
  25.   </DIV>
  26.  
  27.   <BR><BR>
  28.   All imported, linked, and defined style sheets are exposed as
  29.   styleSheet objects into the <TT>styleSheets</TT> array.  The
  30.   following are the properties of each of the stylesheet objects:
  31.  
  32.   <BLOCKQUOTE><DL>
  33.   <SCRIPT>
  34.     document.writeln("<DT CLASS=first><B>LINK</B></DT>");
  35.     document.writeln("<DD><B>id:</B> ");
  36.     document.writeln(document.styleSheets.linked.id);
  37.     document.writeln("</DD>");
  38.     document.writeln("<DD><B>href:</B> ");
  39.     document.writeln(document.styleSheets.linked.href);
  40.     document.writeln("</DD>");
  41.     document.writeln("<DD><B>readOnly:</B> ");
  42.     document.writeln(document.styleSheets.linked.readOnly);
  43.     document.writeln("</DD>");
  44.  
  45.     document.writeln("<DT><B>STYLE</B></DT>");
  46.     document.writeln("<DD><B>title:</B> ");
  47.     document.writeln(document.styleSheets.defined.title);
  48.     document.writeln("</DD>");
  49.     document.writeln("<DD><B>owningElement:</B> ");
  50.     document.writeln(document.styleSheets.defined.owningElement.tagName);
  51.     document.writeln("</DD>");
  52.     document.writeln("<DD><B>readOnly:</B> ");
  53.     document.writeln(document.styleSheets.defined.readOnly);
  54.     document.writeln("</DD>");
  55.  
  56.     document.writeln("<DT><B>@import</B></DT>");
  57.     document.writeln("<DD><B>href:</B> ");
  58.     document.writeln(document.styleSheets.defined.imports[0].href);
  59.     document.writeln("</DD>");
  60.     document.writeln("<DD><B>parentStyleSheet:</B> ");
  61.     document.writeln(document.styleSheets[1].imports[0].parentStyleSheet.id);
  62.     document.writeln("</DD>");
  63.     document.writeln("<DD><B>readOnly:</B> ");
  64.     document.writeln(document.styleSheets.defined.imports[0].readOnly);
  65.     document.writeln("</DD>");
  66.   </SCRIPT>
  67.   </DL></BLOCKQUOTE>
  68.  
  69.   </BLOCKQUOTE>
  70. </BODY>
  71. </HTML>
  72.